/*
 * @Description: 布局
 * @Date: 2021-03-08 17:36:31
 * @Author: 黄治恩
 */

import React, { Component } from 'react';

import Header from '@/components/Header'
// import Footer from '../components/Footer'

import { renderRoute } from '@/router';
import type { RouteOption } from '@/router'

import './style.scss'

interface LayoutProps {
  routes: RouteOption[]
}

class Layout extends Component<LayoutProps> {
  render() {
    const { routes } = this.props
    return (
      <div className="layout">
        <Header />
        <main className="sy-main">
          { 
            renderRoute(routes) 
          }
        </main>
        {/* <Footer /> */}
      </div>
    );
  }
}

export default Layout;